package com.zzedu.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzedu.domain.ZzExerciseBook;
import com.zzedu.dto.ZzExerciseBookDTO;

import java.util.List;
import java.util.Map;

/**
 * 作业本信息Service接口
 *
 * @author Mr.Wang
 * @date 2025-06-02
 */
public interface IZzExerciseBookService extends IService<ZzExerciseBook> {
    /**
     * 构造查询条件
     */
    public LambdaQueryWrapper<ZzExerciseBook> buildQuery(ZzExerciseBookDTO zzExerciseBookDTO);

    /**
     * 根据学生ID、题目内容ID获取提交作业
     *
     * @param stuId
     * @param subjectId
     * @return
     */
    public ZzExerciseBook getByStudentIdAndSubjectId(Long stuId, Long subjectId);

    /**
     * 获取提交次数总和
     *
     * @param unitId
     * @param stuId
     * @param interaction
     * @return
     */
    public Long getSubmitCount(Long unitId, Long stuId, String interaction);

    /**
     * 获取观看视频总时长
     *
     * @param unitId
     * @param stuId
     * @param subjectType
     * @return
     */
    public Long getVideoTimes(Long unitId, Long stuId, String subjectType);

    /**
     * 学生统计学习时长
     *
     * @param stuIdList
     * @return
     */
    public List<Map<String, Object>> studentStudyInfoByStudentIdList(List<Long> stuIdList);
}
